package com.lhf.legalPlant.mapper;

import com.lhf.error.ErrorMessageVo;
import com.lhf.legalPlant.model.FactorySelectVo;
import com.lhf.legalPlant.model.FactoryVo;
import com.lhf.legalPlant.model.LegelPersonVo;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;

import javax.validation.constraints.NotBlank;
import java.util.List;

/**
 * @author 尐痞猫
 * @date2021-06-25 23:29
 */
@Mapper
public interface FactoryMapper {

    List<FactoryVo> query(FactorySelectVo factorySelectVo);
    Integer queryCount(FactorySelectVo factorySelectVo);

    Integer queryByCode(@NotBlank(message = ErrorMessageVo.BIANMABUNENGWEIKONG) String legalPlantCode);

    Integer add(FactoryVo factoryVo);

    Integer update(FactoryVo factoryVo);

    Integer updateStatus(FactoryVo factoryVo);

    List<FactoryVo> queryFactory(LegelPersonVo legelPersonVo);
}
